﻿using System.Collections.Generic;
using System;
using System.Linq;
namespace FlexPlatform.DataModel.Validation.Generic_ValidationRules
{
    public class Pilot_InList<T> : ValidationRuleBase
    {

        protected sealed override bool ValueIsOk(object proposedValue)
        {

            if (((IEnumerable<object>)this.clsSpecificValue).Any(value => proposedValue == value))  //value == proposedValue
            {
                return false;
            }

            else
            {
                return true;
            }
        }

    }
}
